package com.bigbirdmed.cloud.admin.api.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;


public class DeptDTO {

	@Data
	@ApiModel(value = "UpdateDeptDto",description = "修改部门")
	public  static class UpdateDeptDto implements Serializable {
		@NotNull(message = "部门id不能为空")
		@ApiModelProperty("部门id")
		private Long deptId;
		@NotBlank(message = "部门名称不能为空")
		@ApiModelProperty("部门名称")
		private String  deptName;
		@NotNull(message = "排序值不能为空")
		@ApiModelProperty("排序值")
		private Integer  sortOrder;
		@NotNull(message = "排序值不能为空")
		@ApiModelProperty("排序值")
		private Long  parentId;
	}

	@Data
	@ApiModel(value = "DeptIdDTO",description = "id")
	public  static  class  DeptIdDTO implements Serializable  {
		@NotNull(message = "id不能为空")
		@ApiModelProperty("id")
		private Long id;
	}

	@Data
	@ApiModel(value = "RemoveByIdDTO",description = "删除部门")
	public static class  RemoveByIdDTO {
		@ApiModelProperty("ids")
		@Valid
		private List<DeptIdDTO> rows;
	}

	@Data
	@ApiModel(value = "SaveDeptDTO",description = "添加部门")
	public static class SaveDeptDTO implements Serializable {
		@NotBlank(message = "部门名称不能为空")
		@ApiModelProperty("部门名称")
		private String deptName;
		@NotNull(message = "排序值不能为空")
		@ApiModelProperty("排序值")
		private Integer sortOrder;
		@NotNull(message = "parentId不能为空")
		@ApiModelProperty("parentId")
		private Long parentId;

	}
}
